package com.worldtolearn.user.entity;

import java.util.Date;

import javax.inject.Inject;
import javax.inject.Named;
import javax.persistence.Entity;

import com.worldtolearn.offer.entity.Adress;

//import com.worldtolearn.offer.entity.Adress;

@Named
@Entity
public class User extends Person {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	// private String address;
	private Date dateOfBirth;
	private String phoneNumber;
	private String name;
	private String firstName;
	

	@Inject
	private Adress address;

	public User() {
		// TODO Auto-generated constructor stub
	}

	public User(String lastName, String firstName, String mail,
			String password, String role, Adress address, Date dateOfBirth,
			String phoneNumber) {
		super(lastName, firstName, mail, password, role);
		this.address = address;
		this.dateOfBirth = dateOfBirth;
		this.phoneNumber = phoneNumber;
	}

	public User(int id, String firstName, String lastName, String mail,
			String password, String role) {
		super(id, firstName, lastName, mail, password, role);
		// TODO Auto-generated constructor stub
	}

	public User(String firstName, String lastName, String mail,
			String password, String role, Date dateOfBirth, String phoneNumber,
			Adress address) {
		super(firstName, lastName, mail, password, role);
		this.dateOfBirth = dateOfBirth;
		this.phoneNumber = phoneNumber;
		this.address = address;
	}

	public User(int id, String firstName, String lastName, String mail,
			String password, String role, Adress address, Date dateOfBirth,
			String phoneNumber) {
		super(id, firstName, lastName, mail, password, role);
		this.address = address;
		this.dateOfBirth = dateOfBirth;
		this.phoneNumber = phoneNumber;
	}

	public Date getDateOfBirth() {
		return dateOfBirth;
	}

	public void setDateOfBirth(Date dateOfBirth) {
		this.dateOfBirth = dateOfBirth;
	}

	public String getPhoneNumber() {
		return phoneNumber;
	}

	public void setPhoneNumber(String phoneNumber) {
		this.phoneNumber = phoneNumber;
	}

	public Adress getAddress() {
		return address;
	}

	public void setAddress(Adress address) {
		this.address = address;
	}
	public String getName() {
		return super.getLastName();
	}
	public String getFirstName() {
		return super.getFirstName();
	}

}
